import request from "../../utils/request"
import { loginForm, loginRespData, userInfoRespData } from "./type"
//项目用户相关接口
enum API {
  LOGIN_URL = "/admin/acl/index/login",
  USER_INFO = "/admin/acl/index/info",
  LOGOUT_URL = "/admin/acl/index/logout",
}

//用户登录
export const reqLogin = (data: loginForm) =>
  request.post<any, loginRespData>(API.LOGIN_URL, data)
//获取用户信息
export const reqUserInfo = () =>
  request.get<any, userInfoRespData>(API.USER_INFO)
//用户退出登录
export const reqLogout = () => request.post<any, any>(API.LOGOUT_URL)
